/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cn.nju.zyy.basic.executor;

import cn.nju.zyy.basic.LiftOff;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * 
 * @author yingyzhang
 */
public class FixedThreadPool {

	public static void main(String[] args) {
		// Constructor arguments is number of threads;
		ExecutorService exec = Executors.newFixedThreadPool(5);
		for (int i = 0; i < 5; i++) {
			exec.execute(new LiftOff());
		}
		exec.shutdown();
	}
}
